package com.cxso.example.request.sign;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Getter
@Setter
@Schema(description = "根据模板生成合同文档")
public class SignTemplateCreateContractRequest {


    @Schema(description = "模板编号")
    @NotBlank(message = "模板编号不能为空")
    private String templateNumber;

    @Schema(description = "合同编号", example = "唯一，如果用户不填写，自动生成，最大长度64")
    private String contractNum;

    @Schema(description = "模板变量列表", example = "变量名称完全和模板中的一致，提供规则由用户自己定义")
    private List<ReplaceBean> replaceList;


    @Getter
    @Setter
    @Schema(description = "根据模板生成合同文档-模板变量值-入参")
    public static class ReplaceBean {
        @Schema(description = "关键字", example = "user")
        private String keyWord;

        @Schema(description = "变量", example = "user")
        private String keyValue;
    }
}
